#gui.py

from flaskwebgui import FlaskUI
from face.wsgi import application
import socketserver

class DjangoGUI(FlaskUI):
    def set_url(self):
        with socketserver.TCPServer(("localhost", 0), None) as s:
            free_port = s.server_address[1]
        self.host = '127.0.0.1'
        self.port = 8000
        self.localhost = f"http://{self.host}:{self.port}" 
ui = DjangoGUI(application, start_server='django')
# PORT = ui.port
ui.run()

